package cn.sh.library.gmwx.sparql;

import java.util.List;
import java.util.Map;

import cn.sh.library.gmwx.bean.WorkSearchBean;
import cn.sh.library.gmwx.dao.BaseDao;
import cn.sh.library.gmwx.dto.Pager;
import cn.sh.library.gmwx.dto.QueryResult;

public interface WorkSparql extends BaseDao {
    /**
     * Query works
     * @param search
     * @param order
     * @param pager
     * @return
     */
    public QueryResult<Map<String, String>> searchWorks(WorkSearchBean search, String order, Pager pager);

    /**
     * Facet Search
     * @param search
     * @return
     */
    public List<Map<String, String>> countFacetWorks(WorkSearchBean search);
    public List<Map<String, String>> countWorkFacet(WorkSearchBean search, String facet);

    public void updateFacetWork(String facet, String type);
    public void countWork();

    /**
     * Get work's information
     * @param work_uri
     * @return
     */
    public Map<String, String> getWorkInfos(String work_uri);
    public String getCoverHor(String work_uri);

    /**
     * Get remote sparql endpoint resources - person
     * @param person
     * @return
     */
    public QueryResult<Map<String, String>> getRemotePersons(String person, String order, int start, int size);
    public List<Map<String, String>> getRemotePersons(String person);
}
